package com.sskj.gcc.ui.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;
import com.sskj.common.util.SPUtil;
import com.sskj.gcc.R;
import com.sskj.gcc.presenter.PayInBeforePresenter;
import com.sskj.gocoin.common.widget.ToolBarLayout;
import com.sskj.lib.RConfig;
import com.sskj.lib.base.BaseActivity;

import butterknife.BindView;

@Route(path = RConfig.APP_PAY_IN_BEFORE)
public class PayInBeforeActivity extends BaseActivity<PayInBeforePresenter> {

    @BindView(R.id.toolbar)
    ToolBarLayout toolbar;
    @BindView(R.id.btPayInBeforeNext)
    Button btPayInBeforeNext;
    @BindView(R.id.tv_pay_in_before_get)
    TextView tvPayInBeforeGet;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }

    @Override
    protected int getLayoutResId() {
        return R.layout.activity_pay_in_before;
    }

    @Override
    public PayInBeforePresenter getPresenter() {
        return new PayInBeforePresenter();
    }

    @Override
    protected void initView() {
        super.initView();

        toolbar.setLeftButtonOnClickLinster(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
        tvPayInBeforeGet.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SPUtil.put("isPayIn",true);
            }
        });

        btPayInBeforeNext.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ARouter.getInstance().build(RConfig.APP_PAY_IN).navigation();
            }
        });
    }
}
